package zjitc.interfa2.printer;

/**
 * @Author admin
 * @Date 2019/3/22 10:25
 */
public class PrinterFactory {

    public static Printer setprinter(int a){
        Printer printer;
        if (a==1){
            printer=new HPPrinter();
        }else {
            printer=new CPrinter();
        }
        return printer;
    }
    }

